1. Field
The present disclosure relates generally to the field of computer graphics and, more specifically, to universal rasterization of graphic primitives.
2. Background
In computer graphics, high-level representation of an image necessarily contains elements defined in a domain that is different from pixels. Such elements are referred to as graphic primitives, from which more complicated images can be constructed.
In 3D rendering, commonly used graphic primitives include triangles, lines, point sprites, and rectangles. In computer graphics, rasterization is the process used to convert a graphic primitive in a two-dimensional image for a display and assign to each element of the image properties, or attributes, such as color, thickness, depth, and the like. Presently, rasterization is the most popular technique for producing real-time 2D/3D computer graphics applications. In such applications, image frames are generated at a rate of about 20-30 frames per second, which translates in a need for significant computational resources.
Each graphic primitive has specific rasterization algorithms and interpolation formulas for the attributes. For example, a triangle has three vertices and three edges, and attributes for its inner pixels may be interpolated using barycentric or digital differential analyzer (DDA) interpolation, whereas a line has two vertices and its attributes are linearly interpolated. Support of multiple rasterization algorithms requires amounts of computational resources and energy that, in many cases, exceed capabilities of video data processing apparatuses and, in particular, capabilities of mobile video-enabled devices.
As a result, in many mobile video-enabled devices, only a triangle rasterizer is implemented and other graphic primitives are emulated using respective pluralities of triangles. However, this approach also requires substantial computational, memory, and bandwidth overhead. Despite the considerable efforts devoted in the art to increasing efficiency of rasterization routines, further improvements would be desirable.
There is therefore a need in the art for techniques to efficiently implement universal rasterization of graphic primitives.